From af51f19f4b95a2a4562bdc1d2f4747ef5240f2eb Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 5 Oct 2006 16:14:50 +0100 Subject: [PATCH] [XEND] Fix pygrub when run server-side on a domain with blktap disks. For some slightly-crazy reason the blktap patches changed the name of the SEXPR block containing the disk definition 'vbd' to 'tap', even though merely changing the 'uname' fragement was sufficient. eg (vbd (backend 0) (dev hda:disk) (uname file:/xen/rhel4x86_64.img) (mode w) ) changes to (tap (backend 0) (dev hda:disk) (uname tap:aio:/xen/rhel4x86_64.img) (mode w) ) If you create a domain with xm, then xm runs pygrub client side which works fine. If you create a domain by feeding a block of SEXPR to Xend over its network port, then pygrub is run server side. The code in XenD which decides which disk to run pygrub against only looks for 'device/vbd' in the SEXPR so fails to see any blktap disks. Signed-off-by: Daniel P. Berrange --- tools/python/xen/xend/XendDomainInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 230479d7c0..42e3a50dd7 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1745,7 +1745,7 @@ class XendDomainInfo: blcfg = None # FIXME: this assumes that we want to use the first disk device for (n,c) in self.info['device']: - if not n or not c or n != "vbd": + if not n or not c or not(n in ["vbd", "tap"]): continue disk = sxp.child_value(c, "uname") if disk is None: -- 2.30.2